﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Net;
using System.IO;
using System.Windows.Forms;

namespace MyVideoTek
{
    static class Web
    {
        public static string GexXml(string url)
        {
            try
            {
                using (System.Net.WebClient WC = new System.Net.WebClient())
                using (System.IO.Stream s = WC.OpenRead(url))
                using (System.IO.StreamReader sr = new System.IO.StreamReader(s))
                    return sr.ReadToEnd();
            }
            catch (Exception _e)
            {
                 MessageBox.Show("Exception lors de la lecture de " + url);
                return "";
            }
        }
    }
}
